package com.zth.service.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.zth.mapper.CommentMapper;
import com.zth.pojo.Comment;
import com.zth.service.CommentService;

@Service
@Transactional
public class CommentServiceImpl implements CommentService{
	@Autowired
	private CommentMapper commentMapper;
	
	@Override
	public List<Comment> commentAll(int page,int pageSize,Comment comment) {
		PageHelper.startPage(page,pageSize);
		return commentMapper.commentAll(comment);
	}

	@Override
	public int status(int[] ids) {
		
		return commentMapper.status(ids);
	}

	@Override
	public int deleteBatch(int[] ids) {
		return commentMapper.deleteBatch(ids);
	}

	@Override
	public int reply(Comment comment) {
		return commentMapper.reply(comment);
	}

	@Override
	public List<Comment> findById(int id) {
		return commentMapper.findById(id);
	}

	@Override
	public int add(Comment comment) {
		return commentMapper.add(comment);
	}

}
